package com.only4play.practice.ordercenter.core.controller;

import com.only4play.codegen.support.model.JsonObject;
import com.only4play.practice.ordercenter.core.domainservice.IOrderDomainService;
import com.only4play.practice.ordercenter.api.model.domainmodel.OrderCreateModel;
import com.only4play.practice.ordercenter.core.service.IOrderBaseService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
    * <p>
    *  前端控制器
    * </p>
*
* @author mdy
* @since 2024-09-13
*/
@RestController
@RequestMapping("/trade/order/base/v1")
public class OrderBaseController {

    @Resource
    private IOrderBaseService orderBaseService;

    @Resource
    private IOrderDomainService orderDomainService;


    @RequestMapping(value = "/create",method = {RequestMethod.POST})
    public JsonObject<Boolean> createOrder(@RequestBody OrderCreateModel model){
        return JsonObject.success(orderDomainService.orderCreate(model));
    }

}
